/**
 * Copyright &copy; 2015-2020 <a href="http://www.easyhis.com/">easyhis</a> All rights reserved.
 */
package com.easy.dfcapi.entity;

import javax.validation.constraints.NotNull;
import com.easy.modules.sys.entity.User;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.easy.core.persistence.DataEntity;
import com.easy.common.utils.excel.annotation.ExcelField;

/**
 * 商品权限Entity
 * @author waylen chi
 * @version 2018-01-17
 */
public class ApiProductAuth extends DataEntity<ApiProductAuth> {
	
	private static final long serialVersionUID = 1L;
	private Integer productId;		// 商品内部ID
	private Integer userId;		// 用户ID/或好户组序号
	private Integer authAllow;		// 默认1，0禁止，1允许
	private String authType;		// 默认1 1-好友 2-好友分组
	private Date createTime;		// 创建时间
	
	public ApiProductAuth() {
		super();
	}

	@NotNull(message="商品内部ID不能为空")
	@ExcelField(title="商品内部ID", align=2, sort=0)
	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}
	
	@NotNull(message="用户ID/或好户组序号不能为空")
	@ExcelField(title="用户ID/或好户组序号", align=2, sort=1)
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	
	@ExcelField(title="默认1，0禁止，1允许", align=2, sort=2)
	public Integer getAuthAllow() {
		return authAllow;
	}

	public void setAuthAllow(Integer authAllow) {
		this.authAllow = authAllow;
	}
	
	@ExcelField(title="默认1 1-好友 2-好友分组", align=2, sort=3)
	public String getAuthType() {
		return authType;
	}

	public void setAuthType(String authType) {
		this.authType = authType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="创建时间", align=2, sort=4)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}